﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using QzEbook.BaseView;
using QzEbook.AccessObject;
using System.Text;

public partial class buy : CheckPage
{
    private StringBuilder sb;
    protected void Page_Load(object sender, EventArgs e)
    {
        checkUser(Request.Url.PathAndQuery);
        if (String.IsNullOrEmpty(Request["Bid"])) return;
        if (!IsPostBack)
        {
            bindData(int.Parse(Request["Bid"]));
        }
    }

    private void bindData(int bookId)
    {
        sb = new StringBuilder();

        Book book = new Book();
        book.BookId = bookId;
        book=book.select();

        SiteUser userInfo = getUserInfo();
        this.Title = string.Format("购买{0}", book.Title);

        sb.AppendFormat("<h1>尚未开放此功能</h1>");
        sb.AppendFormat("<h3>订单: {0}.</h3>",book.Title);
        sb.AppendFormat("<img src=\"{0}\" title=\"缩略图\"  />", book.ThumbFullPath);
        sb.AppendFormat("<div><strong>订价:{0}元</strong></div>", book.Price);
        sb.AppendFormat("<div><strong>订户:{0}</strong></div>", userInfo.Name);
    }


    protected override void Render(HtmlTextWriter writer)
    {
        writer.Write(sb.ToString());
        base.Render(writer);
    }

}
